PoD,hap: Fix logdirty mode when using hardware assisted paging
authorGeorge Dunlap <george.dunlap@eu.citrix.com>
Mon, 17 Jan 2011 14:29:01 +0000 (14:29 +0000)
committerGeorge Dunlap <george.dunlap@eu.citrix.com>
Mon, 17 Jan 2011 14:29:01 +0000 (14:29 +0000)
commitf56daba7cf165d4e0d91224ecd5b898dfcdb4eb8
tree506fc383d3542c754b1cac10f55e937c87cff219
parent637a283f17eba11a3c1f6255c87fead99bda2e6d
PoD,hap: Fix logdirty mode when using hardware assisted paging

When writing a writable p2m entry for a pfn, we need to mark the pfn
dirty to avoid corruption when doing live migration.

Marking the page dirty exposes another issue, where there are
excessive sweeps for zero pages if there's a mismatch between PoD
entries and cache entries.  Only sweep for zero pages if we actually
need more memory.

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Acked-by: Tim Deegan <Tim.Deegan@citrix.com>
xen/arch/x86/mm/p2m.c